<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span id="title"></span>
<input type="text" id="username">
<button id="btn">签到</button>
</body>
<script type="text/javascript" src="/webjars/jquery/3.1.1/jquery.js"></script>
<script>
    $(function () {
        $("#btn").click(function () {
            $.ajax({
                type:"post",
                url:"/sign",
                data:{
                    username:$("#username").val()
                },
                async:true,
                dataType:"json",
                success:function (data) {
                    if (data==aa){
                        $("#title").append("签到成功")
                    }
                }
            },JSON)
        })
    })
</script>
</html>